package com.tledu.model;

import lombok.Data;

@Data
public class AjaxResult<T> {
    private Integer code;  //200 500
    private String message; //返回的信息
    private Boolean success; // true 成功 false 失败
    private T t;

    public AjaxResult() {
    }

    public AjaxResult(String message, Boolean success) {
        this.message = message;
        this.success = success;
    }

    public AjaxResult(Integer code, String message, Boolean success, T t) {
        this.code = code;
        this.message = message;
        this.success = success;
        this.t = t;
    }

    public AjaxResult(T t) {
        this.code = 200; //200 成功
        this.message = "success";
        this.success = true;
        this.t = t;
    }
}
